<!--siderbar begin//-->
<style>
</style>
<DIV id=sidebar>

    <DIV class=sblock id="profile">
        <H2 class="icon_heart_tiny">个人资料</H2>
        <p><img src="<?php echo $this->profile['headshotUrl'];?>" class="headshot">
        <ul>
            <li><?php echo $this->profile['nickName'];?> <img src="<?php echo $this->mediaUrl;?>/images/icons/tiny/<?php echo $this->sexIcon($this->profile['sex']);?>"></li>
            <li></li>
<?php
if (false == $this->isSelf)
{
    $added = false;
    foreach ($this->friends as $friend)
    {
        if ($friend['userId'] == $this->user['userId'])
        {
            $added = true;
            break;
        }
    }
    if (false == $added)
    {
?>
            <li><a href="/friend/add/?u=<?php echo $this->profile['userId'];?>">加为好友</a></li>
<?php
    }
}
?>
        </ul>
        <BR style="CLEAR: both">
        <BR style="CLEAR: both">
        <div class="intro"><?php echo $this->escape($this->profile['intro']);?></div>
        </p>
    </DIV>

    <DIV class=sblock id=sbattachments>
        <H2 class="icon_people_tiny">好友<A class=more href="/friend/list/">更多</A></H2>
        <P class=pic-thumbs>
<?php
if (false == empty($this->friends))
{
    foreach ($this->friends as $friend)
    {
?>
            <A title="<?php echo $friend['nickName'];?>" href="/?u=<?php echo $friend['userId'];?>"><IMG width="60" height="60" alt="<?php echo $friend['nickName'];?>" src="<?php echo $friend['headshotUrl'];?>"></A></li>
<?php
    }
}
else
{
    echo '没有朋友';
}
?>
        </P>
    </DIV>
    <DIV class=sblock id=sbevent>
        <H2 class=icon_add_person_tiny>活动<A class=more href="/event/list/">更多</A></H2>
        <ul class="vcalendar">
<?php
foreach ($this->events as $event)
{
?>
            <li class="vevent">
                <span class="calSheet">
                    <?php echo $this->eventTime($event['eventTime']);?>
                </span>
                <strong class="summary"><span><a href="/event/index/id/<?php echo $event['id'];?>"><?php echo $event['who'];?></a></span></strong>
                <small class="place">
                    <?php echo $this->location($event['location'], $event['city']);?>
                </small>
                <small class="count">  11 位参加者 </small>
            </li>
<?php
}
?>            
        </ul>
    </DIV>
    <DIV class=sblock id=sbpeople>
        <H2 class=icon_add_person_tiny>邀请朋友</H2>
        <FORM class=new_person id=new_person action="/friend/invite/" method=post>
            <FIELDSET><SPAN class=legend>邀请更多的好友一起来玩吧！</SPAN>
            <OL>
            <LI><LABEL for=person_name>名字</LABEL><INPUT id=person_name size=30 name=person[name]> </LI>
            <LI><LABEL for=person_email>Email</LABEL><INPUT id=person_email size=30 name=person[email]> </LI>
            </OL>
            </FIELDSET> 
            <A class=invitation_link id=invitation_link href="/friend/previewinvite">预览邀请信</A> 
            <INPUT id=person_submit type=submit value="发送邀请" name=commit> 
        </FORM>
    </DIV>
</DIV>
<!--siderbar end//-->
